
#include <BPainter>
#include <BHBoxLayout>
#include <BVBoxLayout>

#include "MainWindow.h"

MainWindow::MainWindow()
{
	_clientWidget = new ClientWidget();
	_serverWidget = new ServerWidget();

	BHBoxLayout* hlayout = new BHBoxLayout(this);
	hlayout->addWidget(_clientWidget);
	hlayout->addWidget(_serverWidget);
	hlayout->setSpacing(6);
	hlayout->setSplitable(true);

	connect("server-started", &MainWindow::slotServerStarted);
}
MainWindow::~MainWindow()
{

}

void MainWindow::slotServerStarted(BObject* object, const BValue& value)
{
	const BString& address = value;
	_clientWidget->setServerAddress(address);
}


